package com.citytransport.prokopjuk.route;

import java.util.Random;

public class Station {

	private int stationID;
	private String name;
	private boolean existingRail;
	private boolean existingCable;
	private static Random random = new Random();

	public Station() {
		stationID = random.nextInt();
		name = "Unnamed " + stationID;
		existingRail = false;
		existingCable = false;
	}

	public Station(int stationID, String name, boolean existingRail,
			boolean existingCable) {
		this.stationID = stationID;
		this.name = name;
		this.existingRail = existingRail;
		this.existingCable = existingCable;
	}
	public Station( String name, boolean existingRail,
		boolean existingCable) {
	this.stationID = random.nextInt();
	this.name = name;
	this.existingRail = existingRail;
	this.existingCable = existingCable;
}

	public int getStationID() {
		return stationID;
	}

	public void setStationID(int statinoID) {
		this.stationID = statinoID;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isExistingRail() {
		return existingRail;
	}

	public boolean isExistingCable() {
		return existingCable;
	}

	public void setExistingRail(boolean existingRail) {
		this.existingRail = existingRail;
	}

	public void setExistingCable(boolean existingCable) {
		this.existingCable = existingCable;
	}
	
	public String toString(){
		return "stationID = " + getStationID() + " name = " + getName()+
				" permission for tram - " + isExistingRail()+ 
				"premision for trolleybus - " + isExistingCable() + "\n";
	}
}
